package com.Entity;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * DataInfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "dataInfo", catalog = "smartsofa")
public class DataInfo implements java.io.Serializable {

	// Fields

	private Integer dataId;
	private Integer userId;
	private short dataType;
	private float dataValue;
	private Date uploadTime;
	private Integer deviceId;

	// Constructors

	/** default constructor */
	public DataInfo() {
	}

	/** full constructor */
	public DataInfo(Integer userId, short dataType, float dataValue,
			Date uploadTime, Integer deviceId) {
		this.userId = userId;
		this.dataType = dataType;
		this.dataValue = dataValue;
		this.uploadTime = uploadTime;
		this.deviceId = deviceId;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "dataId", unique = true, nullable = false)
	public Integer getDataId() {
		return this.dataId;
	}

	public void setDataId(Integer dataId) {
		this.dataId = dataId;
	}

	@Column(name = "userId")
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "dataType")
	public short getDataType() {
		return this.dataType;
	}

	public void setDataType(short dataType) {
		this.dataType = dataType;
	}

	@Column(name = "dataValue", precision = 10, scale = 0)
	public float getDataValue() {
		return this.dataValue;
	}

	public void setDataValue(float dataValue) {
		this.dataValue = dataValue;
	}

	@Column(name = "uploadTime", length = 19)
	public Date getUploadTime() {
		return this.uploadTime;
	}

	public void setUploadTime(Date uploadTime) {
		this.uploadTime = uploadTime;
	}

	@Column(name = "deviceId")
	public Integer getDeviceId() {
		return this.deviceId;
	}

	public void setDeviceId(Integer deviceId) {
		this.deviceId = deviceId;
	}

}